package com.wuxiaofan;

class A extends B{

        public static void main(String[] args) {
            /*A a = new A();
            A b = (A) new B();
            A c = (A) new C();

            C cc = new C();
            C cc2 = new B();
            C cc3 = new A();*/

               int i = f(15,12);
               System.out.println("i="+i);
        }

        private static int f(int x,int y)
        {
                if(x<=1)
                        return 2 * y;
                if(y<=1)
                        return 3*x;
                return f(x-3,y-2);
        }
}


class B extends C{

}

class C{

}